package com.lyy.photovoltaic.common.vo;

public enum ResultCode implements StatusCode{

    NO(40),
    SUCCESS(100, "请求成功"),
    FAILED(101, "请求失败"),

    INSER_SUCCESS(102,"插入数据成功"),
    INSER_FAILED(103,"插入失败，主键已存在"),
    LOGIN_SUCCESS(1001,"登录成功"),
    LOGIN_SUCCESS_USER(10),
    LOGIN_SUCCESS_ADMIN(11),
    LOGIN_FAILED(1002,"登录失败,账号或密码错误"),

    REGIST_SUCCESS(1003,"注册成功"),
    REGIST_FAILED(1004,"注册失败，账号已存在"),
    REGIST_FAILED_USER(1005,"注册失败,创建账号时出错"),
    REGIST_FAILED_Admin(1005,"注册失败,创建账号时出错"),
;
    private int code;
    private String msg;


    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    ResultCode(int code) {
        this.code = code;
    }


    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
